package cuit;

public class Page {

	private int pageSize = 5;
	private int curPage = 1;
	private int totalCount;
	private int totalPageCount;
	private int startPos = 0;
	
	
	public Page() {
	
	}
	public Page(int curPage,int totalCount) {
		this.curPage=curPage;
		this.totalCount=totalCount;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getCurPage() {
		return curPage;
	}
	public void setCurPage(int curPage) {
		this.curPage = curPage;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public int getTotalPageCount() {
		totalPageCount = (totalCount%pageSize==0?totalCount/pageSize:totalCount/pageSize+1);
		return totalPageCount;
	}
	public void setTotalPageCount(int totalPageCount) {
		this.totalPageCount = totalPageCount;
	}
	public int getStartPos() {
		startPos = (curPage - 1)*pageSize;
		return startPos;
	}
	public void setStartPos(int startPos) {
		this.startPos = startPos;
	}
	
	
}
